package com.jiuyin.dianjing.model;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.google.gson.annotations.SerializedName;

import static com.jiuyin.dianjing.api.constant.ApiConstant.LIKE_NOT_OK;

/**
 * 评论Item
 */
public class CommentItemModel implements MultiItemEntity {

    //网络获取
    @SerializedName(value = "header")
    String imgUrl;
    //标题
    @SerializedName(value = "nickname")
    String title;
    //评论内容
    @SerializedName(value = "content")
    String comment;

    //时间
    @SerializedName(value = "create_time")
    String time;

    //点赞个数
    String like = "0";

    //回复个数
    String reply;

    //是否已经点赞
    @SerializedName(value = "thumb")
    String isLike = LIKE_NOT_OK;

    //评论id
    @SerializedName(value = "informationcomment_id")
    String commentId;
    public static final int CLICK_ITEM_VIEW = 1;

    public String getCommentId() {
        return commentId;
    }

    public void setCommentId(String commentId) {
        this.commentId = commentId;
    }


    public String isLike() {
        return isLike;
    }

    public void setIsLike(String like) {
        isLike = like;
    }


    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getReply() {
        return reply;
    }

    public void setReply(String reply) {
        this.reply = reply;
    }


    public String getLike() {
        return like;
    }

    public void setLike(String like) {
        this.like = like;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "CommentItemModel{" +
                "url='" + imgUrl + '\'' +
                ", name='" + title + '\'' +
                ", comment='" + comment + '\'' +
                ", time='" + time + '\'' +
                ", like='" + like + '\'' +
                ", reply='" + reply + '\'' +
                ", isLike='" + isLike + '\'' +
                ", commentId='" + commentId + '\'' +
                '}';
    }

    @Override
    public int getItemType() {
        return CLICK_ITEM_VIEW;
    }
}
